fn main() {
    {
        fn print_country(country_name: String) -> String {
            println!("{}", country_name);

            // Return it here.
            country_name
        }

        let country = String::from("Austria");
        // We have to use let here now to get the String back.
        let country = print_country(country);
        print_country(country);
    }

    println!();

    {
        fn print_country(country_name: &String) {
            println!("{}", country_name);
        }

        let country = String::from("Austria");
        print_country(&country);
        print_country(&country);
    }

    println!();

    {
        // First we say that the function takes a mutable reference.
        fn add_hungary(country_name: &mut String) {
            // push_str() adds a &str to a String.
            country_name.push_str("-Hungary");
            println!("Now it says: {}", country_name);
        }

        let mut country = String::from("Austria");
        // We also need to give it a mutable reference.
        add_hungary(&mut country);
        println!("Now it says: {}", country);
    }

    println!();

    {
        fn adds_hungary(mut country: String) {
            // Here's how: adds_hungary takes the String and declares it mutable!
            country.push_str("-Hungary");
            println!("{}", country);
        }

        // country is not mutable, but we are going to print Austria-Hungary. How?
        let country = String::from("Austria");
        adds_hungary(country);
    }
}
